Address COMMAND 'unDMS <NIL: write 'Dir||File' to 'VirtualDisk' NOPAUSE NOTEXT'
Address COMMAND 'Copy >NIL: FM0:#? all to REPACK:'
end
if ext(file)='ARJ' then Address COMMAND 'UnARJ x 'Dir||File' REPACK:'
if ext(file)='ARC' then do
Pragma('D','REPACK:')
Address COMMAND 'ARC x 'Dir||File
end
if ext(file)='ZOO' then do
Pragma('D','REPACK:')
Address COMMAND 'ZOO eq/ 'Dir||File
end
if ext(file)='GZ' then Address COMMAND 'GZIP 'Dir||left(file,length(file)-1-length(ext(file)))' -cdN >REPACK:'left(file,length(file)-1-length(ext(file)))
if ext(file)='Z' then Address COMMAND 'uncompress 'Dir||left(file,length(file)-1-length(ext(file)))' -c >REPACK:'left(file,length(file)-1-length(ext(file)))
if RC ~= 0 then do
say ''
say 'WARNING! Something went wrong while unpacking 'file'.'
say 'The 'ext(file)' file could be corrupt, or (hopefully) there wasnt enough'
say 'space left on your hd/ramdisk.'
call writech(stdout,'Do you want to continue? (some files might be LOST forever) (y/N) ')